package com.wjk.Demo07;

public class TestSwimming {
    public static void main(String[] args) {
        goSwim(new Swimming() {
            @Override
            public void swim() {
                System.out.println("老铁们，游泳去奥");
            }
        });

        goSwim(()->
            System.out.println("游泳去奥，老铁们")
        );
    }
    public static void goSwim(Swimming swim){
        swim.swim();
    }
}

interface Swimming{
    void swim();
}
